/**
 * Copyright (c) 时间, Tal.Ben 袁东昊 (ydonghao2@gmail.com).
 *
 * 版权
 */
package com.talben.soudian.ui;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.view.View;

import com.talben.soudian.R;
import com.talben.soudian.base.BaseActivity;
import com.talben.soudian.fragment.viewpagerfragment.ApkViewPagerFragment;

/**
 * @Title: ApkListActivity.java
 * @Package com.talben.soudian.ui
 * @Description: TODO(添加描述)
 * @author Tal.Ben
 * @date 2015年6月20日 下午11:29:53
 * @version v1.0
 */
public class ApkListActivity extends BaseActivity{

	private int mPosition;
	private static final String TAG = "FLAG_TAG";
	
	@Override
    protected int getLayoutId() {
        return R.layout.activity_simple_fragment;
    }

    @Override
    protected boolean hasBackButton() {
        return true;
    }
    
    @Override
    protected int getActionBarTitle() {
        return R.string.apk_zone;
    }
    
    @Override
    protected void init(Bundle savedInstanceState) {
        super.init(savedInstanceState);
        mPosition = getIntent().getIntExtra("position", 1);
        
        try {
            Fragment fragment = (Fragment) ApkViewPagerFragment.newInstance(mPosition);

            FragmentTransaction trans = getSupportFragmentManager()
                    .beginTransaction();
            trans.replace(R.id.container, fragment, TAG);
            trans.commitAllowingStateLoss();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
	
	@Override
	public void onClick(View v) {
		
	}

	@Override
	public void initView() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void initData() {
		
	}
	
}

